package com.ttbj.api.refund;

import java.util.List;
import java.util.Map;

import com.ttbj.api.dto.Page;
import com.ttbj.api.dto.RefundDto;
import com.ttbj.api.exception.BusinessException;


public interface RefundService {
	/**
	 * 条件分页查询退款记录
	 * @param refundDto 查询条件的退款类
	 * @param page 分页信息
	 * @return
	 * @throws BusinessException
	 */
	public List<RefundDto> findRefundInfoByPage(RefundDto refundDto, Page page) throws BusinessException;
	
	/**
	 * 条件分页查询退款记录数量
	 * @param refundDto 查询条件的退款类
	 * @return
	 * @throws BusinessException
	 */
	public int findRefundInfoByPageCount(RefundDto refundDto) throws BusinessException;
	
	/**
	 * 退款操作
	 * @param orgMerOrderNum：原消费交易商户订单号，就是支付表中的merOrderNum
	 * @param refundAmtStr：退款金额，单位：分
	 * @throws BusinessException
	 */
	public void refundTransaction(String orgMerOrderNum, String refundAmtStr) throws BusinessException;
	
	/**
	 * 保存退款记录
	 * @param refundMap 退款记录信息
	 * @return
	 * @throws BusinessException
	 */
	public int addRefundInfo(Map<String, String> refundMap) throws BusinessException;
}
